package com.zyfdroid.bigdialerkit;

import android.Manifest;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import com.zyfdroid.bigdialerkit.utils.BaseActivity;
import com.zyfdroid.bigdialerkit.utils.PermissionUtils;

public class MainActivity extends BaseActivity {



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // 检查权限
        if (!PermissionUtils.hasRequiredPermissions(this)) {
            PermissionUtils.showPermissionDialog(this);
        }

        findViewById(R.id.btnStartDialer).setOnClickListener(v ->
                startActivity(new Intent(MainActivity.this, DailerActivity.class)));
        findViewById(R.id.btnStartContact).setOnClickListener(v ->
                startActivity(new Intent(MainActivity.this, ContactActivity.class)));
        findViewById(R.id.btnStartNoter).setOnClickListener(v ->
                startActivity(new Intent(MainActivity.this, NoteActivity.class)));

    }

    @Override
    public void onBackPressed() {
        finish();
    }
}